﻿namespace Innovative.ProXr
{
	public static partial class DirectApi
	{
		/// <summary>
		/// These commands are called Bank Directed commands. They contains commands to be performed 
		/// on the selected bank. A bank can be selected using the SetSelectedBank API command. Bank
		/// selection is made before calling any of these commands. Once a bank is selected, all 
		/// subsequent commands are performed against the relays in that bank until another bank
		/// is selected.
		/// </summary>
		public static class SelectedBank
		{
			#region Off
			/// <summary>
			/// Turns off Relay 1 in the currently selected relay bank.
			/// An optional parameter of 1 turns off the next relay.
			/// An optional parameter of 7 turns off the next 7 relays.
			/// </summary>
			public static RelayCommandSet<bool, RelayCount> RelayZeroOff = new RelayCommandSet<bool, RelayCount>()
			{
				Commands = new RelayCommand[]
				{
					RelayCommand.Command254,
					RelayCommand.CreateReadOnlyCommand(1, 0),
					RelayCommand.CreateOptionalParameterCommand(2, new RelayByte[] { 0, 1, 2, 3, 4, 5, 6, 7 })
				},
				ExpectedResults = new RelayByte[] { 85 },
				ResponseConverter = new Boolean85ResponseConverter(),
				Parameter1Converter = new RelayCountParameterConverter()
			};

			/// <summary>
			/// Turns off Relay 2 in the currently selected relay bank.
			/// An optional parameter of 1 turns off the next relay.
			/// An optional parameter of 6 turns off the next 6 relays.
			/// </summary>
			public static RelayCommandSet<bool, RelayCount> RelayOneOff = new RelayCommandSet<bool, RelayCount>()
			{
				Commands = new RelayCommand[]
				{
					RelayCommand.Command254,
					RelayCommand.CreateReadOnlyCommand(1, 1),
					RelayCommand.CreateOptionalParameterCommand(2, new RelayByte[] { 0, 1, 2, 3, 4, 5, 6 })
				},
				ExpectedResults = new RelayByte[] { 85 },
				ResponseConverter = new Boolean85ResponseConverter(),
				Parameter1Converter = new RelayCountParameterConverter()
			};

			/// <summary>
			/// Turns off Relay 3 in the currently selected relay bank.
			/// An optional parameter of 1 turns off the next relay.
			/// An optional parameter of 5 turns of the next 5 relays.
			/// </summary>
			public static RelayCommandSet<bool, RelayCount> RelayTwoOff = new RelayCommandSet<bool, RelayCount>()
			{
				Commands = new RelayCommand[]
				{
					RelayCommand.Command254,
					RelayCommand.CreateReadOnlyCommand(1, 2),
					RelayCommand.CreateOptionalParameterCommand(2, new RelayByte[] { 0, 1, 2, 3, 4, 5 })
				},
				ExpectedResults = new RelayByte[] { 85 },
				ResponseConverter = new Boolean85ResponseConverter(),
				Parameter1Converter = new RelayCountParameterConverter()
			};

			/// <summary>
			/// Turns off Relay 4 in the currently selected relay bank.
			/// An optional parameter of turns off the next relay.
			/// An optional parameter of 4 turns off the next 4 relays.
			/// </summary>
			public static RelayCommandSet<bool, RelayCount> RelayThreeOff = new RelayCommandSet<bool, RelayCount>()
			{
				Commands = new RelayCommand[]
				{
					RelayCommand.Command254,
					RelayCommand.CreateReadOnlyCommand(1, 3),
					RelayCommand.CreateOptionalParameterCommand(2, new RelayByte[] { 0, 1, 2, 3, 4 })
				},
				ExpectedResults = new RelayByte[] { 85 },
				ResponseConverter = new Boolean85ResponseConverter(),
				Parameter1Converter = new RelayCountParameterConverter()
			};

			/// <summary>
			/// Turns off Relay 5 in the currently selected relay bank.
			/// An optional parameter of 1 turns off the next relay.
			/// An optional parameter 3 turns off the next 3 relays.
			/// </summary>
			public static RelayCommandSet<bool, RelayCount> RelayFourOff = new RelayCommandSet<bool, RelayCount>()
			{
				Commands = new RelayCommand[]
				{
					RelayCommand.Command254,
					RelayCommand.CreateReadOnlyCommand(1, 4),
					RelayCommand.CreateOptionalParameterCommand(2, new RelayByte[] { 0, 1, 2, 3 })
				},
				ExpectedResults = new RelayByte[] { 85 },
				ResponseConverter = new Boolean85ResponseConverter(),
				Parameter1Converter = new RelayCountParameterConverter()
			};

			/// <summary>
			/// Turns off Relay 6 in the currently selected relay bank.
			/// An optional parameter of 1 turns off the next relay.
			/// An optional parameter of 1 turns off the next relay.
			/// An optional parameter of 2 turns off the next 2 relays.
			/// </summary>
			public static RelayCommandSet<bool, RelayCount> RelayFiveOff = new RelayCommandSet<bool, RelayCount>()
			{
				Commands = new RelayCommand[]
				{
					RelayCommand.Command254,
					RelayCommand.CreateReadOnlyCommand(1, 5),
					RelayCommand.CreateOptionalParameterCommand(2, new RelayByte[] { 0, 1, 2 })
				},
				ExpectedResults = new RelayByte[] { 85 },
				ResponseConverter = new Boolean85ResponseConverter(),
				Parameter1Converter = new RelayCountParameterConverter()
			};

			/// <summary>
			/// Turns off Relay 7 in the currently selected relay bank.
			/// An optional parameter of 1 turns off the next relay.
			/// </summary>
			public static RelayCommandSet<bool, RelayCount> RelaySixOff = new RelayCommandSet<bool, RelayCount>()
			{
				Commands = new RelayCommand[]
				{
					RelayCommand.Command254,
					RelayCommand.CreateReadOnlyCommand(1, 6),
					RelayCommand.CreateOptionalParameterCommand(2, new RelayByte[] { 0, 1 })
				},
				ExpectedResults = new RelayByte[] { 85 },
				ResponseConverter = new Boolean85ResponseConverter(),
				Parameter1Converter = new RelayCountParameterConverter()
			};

			/// <summary>
			/// Turns off Relay 8 in the currently selected relay bank.
			/// </summary>
			public static RelayCommandSet<bool, RelayCount> RelaySevenOff = new RelayCommandSet<bool, RelayCount>()
			{
				Commands = new RelayCommand[]
				{
					RelayCommand.Command254,
					RelayCommand.CreateReadOnlyCommand(1, 7)
				},
				ExpectedResults = new RelayByte[] { 85 },
				ResponseConverter = new Boolean85ResponseConverter(),
				Parameter1Converter = new RelayCountParameterConverter()
			};
			#endregion

			#region On
			/// <summary>
			/// Turns on Relay 1 the currently selected relay bank.
			/// An optional parameter of 1 turns on the next relay.
			/// An optional parameter of 7 turns on the next 7 relays.
			/// </summary>
			public static RelayCommandSet<bool, RelayCount> RelayZeroOn = new RelayCommandSet<bool, RelayCount>()
			{
				Commands = new RelayCommand[]
				{
					RelayCommand.Command254,
					RelayCommand.CreateReadOnlyCommand(1, 8),
					RelayCommand.CreateOptionalParameterCommand(2, new RelayByte[] { 0, 1, 2, 3, 4, 5, 6, 7 })
				},
				ExpectedResults = new RelayByte[] { 85 },
				ResponseConverter = new Boolean85ResponseConverter(),
				Parameter1Converter = new RelayCountParameterConverter()
			};

			/// <summary>
			/// Turns on Relay 2 in the currently selected relay bank.
			/// An optional parameter of 1 turns on the next relay.
			/// An optional parameter of 6 turns on the next 6 relays
			/// </summary>
			public static RelayCommandSet<bool, RelayCount> RelayOneOn = new RelayCommandSet<bool, RelayCount>()
			{
				Commands = new RelayCommand[]
				{
					RelayCommand.Command254,
					RelayCommand.CreateReadOnlyCommand(1, 9),
					RelayCommand.CreateOptionalParameterCommand(2, new RelayByte[] { 0, 1, 2, 3, 4, 5, 6 })
				},
				ExpectedResults = new RelayByte[] { 85 },
				ResponseConverter = new Boolean85ResponseConverter(),
				Parameter1Converter = new RelayCountParameterConverter()
			};

			/// <summary>
			/// Turns on Relay 3 in the currently selected relay bank.
			/// An optional parameter of 1 turns on the next relay.
			/// An optional parameter of 5 turns on the next 5 relays.
			/// </summary>
			public static RelayCommandSet<bool, RelayCount> RelayTwoOn = new RelayCommandSet<bool, RelayCount>()
			{
				Commands = new RelayCommand[]
				{
					RelayCommand.Command254,
					RelayCommand.CreateReadOnlyCommand(1, 10),
					RelayCommand.CreateOptionalParameterCommand(2, new RelayByte[] { 0, 1, 2, 3, 4, 5 })
				},
				ExpectedResults = new RelayByte[] { 85 },
				ResponseConverter = new Boolean85ResponseConverter(),
				Parameter1Converter = new RelayCountParameterConverter()
			};

			/// <summary>
			/// Turns on Relay 4 in the currently selected relay bank.
			/// An optional parameter of 1 turns on the next relay.
			/// An optional parameter of 4 turns on the next 4 relays.
			/// </summary>
			public static RelayCommandSet<bool, RelayCount> RelayThreeOn = new RelayCommandSet<bool, RelayCount>()
			{
				Commands = new RelayCommand[]
				{
					RelayCommand.Command254,
					RelayCommand.CreateReadOnlyCommand(1, 11),
					RelayCommand.CreateOptionalParameterCommand(2, new RelayByte[] { 0, 1, 2, 3, 4 })
				},
				ExpectedResults = new RelayByte[] { 85 },
				ResponseConverter = new Boolean85ResponseConverter(),
				Parameter1Converter = new RelayCountParameterConverter()
			};

			/// <summary>
			/// Turns on Relay 5 in the currently selected relay bank.
			/// An optional parameter of 1 turns on the next relay.
			/// An optional parameter of 3 turns on the next 3 relays.
			/// </summary>
			public static RelayCommandSet<bool, RelayCount> RelayFourOn = new RelayCommandSet<bool, RelayCount>()
			{
				Commands = new RelayCommand[]
				{
					RelayCommand.Command254,
					RelayCommand.CreateReadOnlyCommand(1, 12),
					RelayCommand.CreateOptionalParameterCommand(2, new RelayByte[] { 0, 1, 2, 3 })
				},
				ExpectedResults = new RelayByte[] { 85 },
				ResponseConverter = new Boolean85ResponseConverter(),
				Parameter1Converter = new RelayCountParameterConverter()
			};

			/// <summary>
			/// Turns on Relay 6 in the currently selected relay bank.
			/// An optional parameter of 1 turns on the next relay.
			/// An optional parameter of 2 turns on the next 2 relays.
			/// </summary>
			public static RelayCommandSet<bool, RelayCount> RelayFiveOn = new RelayCommandSet<bool, RelayCount>()
			{
				Commands = new RelayCommand[]
				{
					RelayCommand.Command254,
					RelayCommand.CreateReadOnlyCommand(1, 13),
					RelayCommand.CreateOptionalParameterCommand(2, new RelayByte[] { 0, 1, 2 })
				},
				ExpectedResults = new RelayByte[] { 85 },
				ResponseConverter = new Boolean85ResponseConverter(),
				Parameter1Converter = new RelayCountParameterConverter()
			};

			/// <summary>
			/// Turns on Relay 7 in the currently selected relay bank.
			/// An optional parameter of 1 turns on the next relay.
			/// </summary>
			public static RelayCommandSet<bool, RelayCount> RelaySixOn = new RelayCommandSet<bool, RelayCount>()
			{
				Commands = new RelayCommand[]
				{
					RelayCommand.Command254,
					RelayCommand.CreateReadOnlyCommand(1, 14),
					RelayCommand.CreateOptionalParameterCommand(2, new RelayByte[] { 0, 1 })
				},
				ExpectedResults = new RelayByte[] { 85 },
				ResponseConverter = new Boolean85ResponseConverter(),
				Parameter1Converter = new RelayCountParameterConverter()
			};

			/// <summary>
			/// Turns on Relay 8 in the currently selected relay bank.
			/// </summary>
			public static RelayCommandSet<bool, RelayCount> RelaySevenOn = new RelayCommandSet<bool, RelayCount>()
			{
				Commands = new RelayCommand[]
				{
					RelayCommand.Command254,
					RelayCommand.CreateReadOnlyCommand(1, 15)
				},
				ExpectedResults = new RelayByte[] { 85 },
				ResponseConverter = new Boolean85ResponseConverter(),
				Parameter1Converter = new RelayCountParameterConverter()
			};
			#endregion

			#region Status
			/// <summary>
			/// Report the On/Off Status of the Relay 0 in the currently selected relay bank.
			/// </summary>
			public static RelayCommandSet<RelayStatus> ReportRelayZeroStatus = new RelayCommandSet<RelayStatus>()
			{
				Commands = new RelayCommand[]
				{
					RelayCommand.Command254,
					RelayCommand.CreateReadOnlyCommand(1, 16)
				},
				ExpectedResults = new RelayByte[] { 0, 1 },
				ResponseConverter = new RelayStatusResponseConverter()
			};

			/// <summary>
			/// Report the On/Off Status of the Relay 1 in the currently selected relay bank.
			/// 0 indicates Off and 1 indicates On.
			/// </summary>
			public static RelayCommandSet<RelayStatus> ReportRelayOneStatus = new RelayCommandSet<RelayStatus>()
			{
				Commands = new RelayCommand[]
				{
					RelayCommand.Command254,
					RelayCommand.CreateReadOnlyCommand(1, 17)
				},
				ExpectedResults = new RelayByte[] { 0, 1 },
				ResponseConverter = new RelayStatusResponseConverter()
			};

			/// <summary>
			/// Report the On/Off Status of the Relay 2 in the currently selected relay bank.
			/// 0 indicates Off and 1 indicates On.
			/// </summary>
			public static RelayCommandSet<RelayStatus> ReportRelayTwoStatus = new RelayCommandSet<RelayStatus>()
			{
				Commands = new RelayCommand[]
				{
					RelayCommand.Command254,
					RelayCommand.CreateReadOnlyCommand(1, 18)
				},
				ExpectedResults = new RelayByte[] { 0, 1 },
				ResponseConverter = new RelayStatusResponseConverter()
			};

			/// <summary>
			/// Report the On/Off Status of the Relay 3 in the currently selected relay bank.
			/// 0 indicates Off and 1 indicates On.
			/// </summary>
			public static RelayCommandSet<RelayStatus> ReportRelayThreeStatus = new RelayCommandSet<RelayStatus>()
			{
				Commands = new RelayCommand[]
				{
					RelayCommand.Command254,
					RelayCommand.CreateReadOnlyCommand(1, 19)
				},
				ExpectedResults = new RelayByte[] { 0, 1 },
				ResponseConverter = new RelayStatusResponseConverter()
			};

			/// <summary>
			/// Report the On/Off Status of the Relay 4 in the currently selected relay bank.
			/// 0 indicates Off and 1 indicates On.
			/// </summary>
			public static RelayCommandSet<RelayStatus> ReportRelayFourStatus = new RelayCommandSet<RelayStatus>()
			{
				Commands = new RelayCommand[]
				{
					RelayCommand.Command254,
					RelayCommand.CreateReadOnlyCommand(1, 20)
				},
				ExpectedResults = new RelayByte[] { 0, 1 },
				ResponseConverter = new RelayStatusResponseConverter()
			};

			/// <summary>
			/// Report the On/Off Status of the Relay 5 in the currently selected relay bank.
			/// 0 indicates Off and 1 indicates On.
			/// </summary>
			public static RelayCommandSet<RelayStatus> ReportRelayFiveStatus = new RelayCommandSet<RelayStatus>()
			{
				Commands = new RelayCommand[]
				{
					RelayCommand.Command254,
					RelayCommand.CreateReadOnlyCommand(1, 21)
				},
				ExpectedResults = new RelayByte[] { 0, 1 },
				ResponseConverter = new RelayStatusResponseConverter()
			};

			/// <summary>
			/// Report the On/Off Status of the Relay 6 in the currently selected relay bank.
			/// 0 indicates Off and 1 indicates On.
			/// </summary>
			public static RelayCommandSet<RelayStatus> ReportRelaySixStatus = new RelayCommandSet<RelayStatus>()
			{
				Commands = new RelayCommand[]
				{
					RelayCommand.Command254,
					RelayCommand.CreateReadOnlyCommand(1, 22)
				},
				ExpectedResults = new RelayByte[] { 0, 1 },
				ResponseConverter = new RelayStatusResponseConverter()
			};

			/// <summary>
			/// Report the On/Off Status of the Relay 7 in the currently selected relay bank.
			/// 0 indicates Off and 1 indicates On.
			/// </summary>
			public static RelayCommandSet<RelayStatus> ReportRelaySevenStatus = new RelayCommandSet<RelayStatus>()
			{
				Commands = new RelayCommand[]
				{
					RelayCommand.Command254,
					RelayCommand.CreateReadOnlyCommand(1, 23)
				},
				ExpectedResults = new RelayByte[] { 0, 1 },
				ResponseConverter = new RelayStatusResponseConverter()
			};
			#endregion

			#region Other
			/// <summary>
			/// Reports the Current Status of 8 Relays in the currently selected relay bank. If the Bank Value equals 0, then 
			/// 32 bytes will be returned by this command representing the status of the first 32 relay banks. Each byte 
			/// returned from the controller will have a value from 0-255. Convert this value to binary to see the On/Off 
			/// status of each relay in the relay bank.
			/// </summary>
			public static RelayCommandSet ReportRelayStatus = new RelayCommandSet()
			{
				Commands = new RelayCommand[]
				{
					RelayCommand.Command254,
					RelayCommand.CreateReadOnlyCommand(1, 24)
				},
				ExpectedResults = (new RelayByte[0]).CreateRange(0, 255)
			};

			/// <summary>
			/// Turn OFF all relays. If the currently selected relay bank is 0 then all relays will be turned off in all relay banks.
			/// </summary>
			public static RelayCommandSet<bool> TurnAllRelaysOff = new RelayCommandSet<bool>()
			{
				Commands = new RelayCommand[]
				{
					RelayCommand.Command254,
					RelayCommand.CreateReadOnlyCommand(1, 29)
				},
				ExpectedResults = new RelayByte[] { 85 },
				ResponseConverter = new Boolean85ResponseConverter()
			};

			/// <summary>
			/// Turn ON all relays. If the currently selected relay bank is 0 than all relays will be turned on in all relay banks.
			/// </summary>
			public static RelayCommandSet<bool> TurnAllRelaysOn = new RelayCommandSet<bool>()
			{
				Commands = new RelayCommand[]
				{
					RelayCommand.Command254,
					RelayCommand.CreateReadOnlyCommand(1, 30)
				},
				ExpectedResults = new RelayByte[] { 85 },
				ResponseConverter = new Boolean85ResponseConverter()
			};

			/// <summary>
			/// Inverts the status of all relays in the currently selected relay bank. All relays that are off will turn on. All 
			/// relays that are on will turn off. If a bank value of 0 is selected, all relays in all relay banks will be inverted.
			/// </summary>
			public static RelayCommandSet<bool> InvertAllRelays = new RelayCommandSet<bool>()
			{
				Commands = new RelayCommand[]
				{
					RelayCommand.Command254,
					RelayCommand.CreateReadOnlyCommand(1, 31)
				},
				ExpectedResults = new RelayByte[] { 85 },
				ResponseConverter = new Boolean85ResponseConverter()
			};

			/// <summary>
			/// Reverses the status of all relays in the currently selected relay bank. This command effectively swaps the status of all relays like a mirror:
			/// The status of Relay 1 is copied to Relay 8
			/// That status of Relay 2 is copied to Relay 7
			/// The status of Relay 3 is copied to Relay 6
			/// The status of Relay 4 is copied to Relay 5
			/// The status of Relay 5 is copied to Relay 4
			/// The status of Relay 6 is copied to Relay 3
			/// The status of Relay 7 is copied to Relay 2
			/// The status of Relay 8 is copied to Relay 1
			/// If a bank value of 0 is selected, all relays in all relay banks will be reversed.
			/// </summary>
			public static RelayCommandSet<bool> ReverseAllRelays = new RelayCommandSet<bool>()
			{
				Commands = new RelayCommand[]
				{
					RelayCommand.Command254,
					RelayCommand.CreateReadOnlyCommand(1, 32)
				},
				ExpectedResults = new RelayByte[] { 85 },
				ResponseConverter = new Boolean85ResponseConverter()
			};

			/// <summary>
			/// Returns the currently selected relay bank.
			/// </summary>
			public static RelayCommandSet<int> GetSelectedBank = new RelayCommandSet<int>()
			{
				Commands = new RelayCommand[]
				{
					RelayCommand.Command254,
					RelayCommand.CreateReadOnlyCommand(1, 34)
				},
				ExpectedResults = (new RelayByte[0]).CreateRange(0, 255),
				ResponseConverter = new Int32ResponseConverter()
			};

			/// <summary>
			/// Sets the status of all relays in the currently selected relay bank. This command requires a parameter 
			/// value of 0-255. This parameter sets the status of all relays to the Binary equivalent value. 254, 40, 0 
			/// turns off all relays. 254, 40, 255 turns on all relays. 254, 40, 85 turns off every other relay. If a 
			/// bank value of 0 is selected, this will set the command status of all relays in all relay banks.
			/// </summary>
			public static RelayCommandSet<bool, int> SetAllRelaysStatus = new RelayCommandSet<bool, int>()
			{
				Commands = new RelayCommand[]
				{
					RelayCommand.Command254,
					RelayCommand.CreateReadOnlyCommand(1, 40),
					RelayCommand.CreateOptionalParameterCommand(2, (new RelayByte[0]).CreateRange(0, 255))
				},
				ExpectedResults = new RelayByte[] { 85 },
				ResponseConverter = new Boolean85ResponseConverter(),
				Parameter1Converter = new Int32ParameterConverter()
			};

			/// <summary>
			/// This command stores the current state of all relays as the power-up default state. 254, 42, 0 stores all relays 
			/// in all banks. 254, 42, 1 stores the current status of bank 1 only. The maximum possible value depends on how many 
			/// relay banks are attached. If your controller supports 255 relay banks, then 255 may be used.
			/// </summary>
			public static RelayCommandSet<bool, int> StoreRelayState = new RelayCommandSet<bool, int>()
			{
				Commands = new RelayCommand[]
				{
					RelayCommand.Command254,
					RelayCommand.CreateReadOnlyCommand(1, 42),
					RelayCommand.CreateOptionalParameterCommand(2, (new RelayByte[0]).CreateRange(0, 255))
				},
				ExpectedResults = new RelayByte[] { 85 },
				ResponseConverter = new Boolean85ResponseConverter(),
				Parameter1Converter = new Int32ParameterConverter()
			};

			/// <summary>
			/// This command reports the power-up default status of relays in the selected relay bank. If bank 0 
			/// is selected (254,43,0) then the controller reports the status of the first 32 relay banks. The 
			/// maximum value for this command will depend on the AT Banks (attached relay banks supported by your 
			/// controller). This command reports a value of 0-255 indicating the power-up default status of the selected bank
			/// </summary>
			public static RelayCommandSet<int[], int> GetPowerupDefaults = new RelayCommandSet<int[], int>()
			{
				Commands = new RelayCommand[]
				{
					RelayCommand.Command254,
					RelayCommand.CreateReadOnlyCommand(1, 43),
					RelayCommand.CreateOptionalParameterCommand(2, (new RelayByte[0]).CreateRange(0, 255))
				},
				ExpectedResults = (new RelayByte[0]).CreateRange(0, 255),
				ResponseConverter = new Int32ArrayResponseConverter(),
				Parameter1Converter = new Int32ParameterConverter()
			};

			/// <summary>
			/// Reads the status of a selected relay. This command provides a quick way to read the status of a single relay 
			/// using a relay number. Since the communication bus is limited to 8 bits, this command can accept a byte to read 
			/// the status of the first 256 relays, or it can accept a word, to read the status of more than 256 relays. The 
			/// optional parameter [0-255] is usually a value of 0 or 1 for many controllers, 0 indicating the first 256 relays, 
			/// 1 indicating the next 256 relays. The actual maximum value for this command will depend on the number of relays 
			/// supported by your controller.
			/// </summary>
			public static RelayCommandSet<RelayStatus, int, int> GetSelectedRelayStatus = new RelayCommandSet<RelayStatus, int, int>()
			{
				Commands = new RelayCommand[]
				{
					RelayCommand.Command254,
					RelayCommand.CreateReadOnlyCommand(1, 44),
					RelayCommand.CreateOptionalParameterCommand(2, (new RelayByte[0]).CreateRange(0, 255)),
					RelayCommand.CreateOptionalParameterCommand(3, (new RelayByte[0]).CreateRange(0, 255)),
				},
				ExpectedResults = new RelayByte[] { 0, 1 },
				ResponseConverter = new RelayStatusResponseConverter(),
				Parameter1Converter = new Int32ParameterConverter(),
				Parameter2Converter = new Int32ParameterConverter(),
			};

			/// <summary>
			/// Select a Relay Bank to control. This command is used to set the relay bank number. When you set the relay bank number to 1, 
			/// all relay control commands will be directed to relay bank 1 to control the first 8 relays on the controller. When the bank 
			/// is set to 2, relay control commands will be directed to relay bank 2 (the second group of 8 relays). A bank value of 0 directs 
			/// relay control commands to all relay banks. Values from 0 to 255 are valid bank values, however, most controllers support less 
			/// than 255 relay banks, so the maximum value for this parameter will be limited to the total number of relay banks supported 
			/// by your particular controller.
			/// </summary>
			public static RelayCommandSet<bool, int> SetSelectedBank = new RelayCommandSet<bool, int>()
			{
				Commands = new RelayCommand[]
				{
					RelayCommand.Command254,
					RelayCommand.CreateReadOnlyCommand(1, 49),
					RelayCommand.CreateOptionalParameterCommand(2, (new RelayByte[0]).CreateRange(0, 255))
				},
				ExpectedResults = new RelayByte[] { 85 },
				ResponseConverter = new Boolean85ResponseConverter(),
				Parameter1Converter = new Int32ParameterConverter()
			};
			#endregion
		}
	}
}
